import React, { useState } from "react";
import './StyleGrid.less'
import {Position, Style} from "./index";


export const OptionComponent = React.memo(function ({ children, value }) {
  return <option value={value}>{children}</option>
})

export default React.memo(function ({ label, children, value, onChange }) {
  return (
    <div className="form-item row flex-center">
      <div className="col-8 form-item-label">
        <label>{ label }</label>
      </div>
      <div className={`col-16 form-item-control`}>
        <select className="cb-select" defaultValue={value} onChange={onChange}>{children}</select>
      </div>
    </div>
  )
})